
// <copyright file="ClauseCondition.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The clause condition.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Data.Dynamic
{
    /// <summary>
    /// The clause condition.
    /// </summary>
    public class ClauseCondition
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="ClauseCondition"/> class.
        /// </summary>
        public ClauseCondition()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ClauseCondition"/> class.
        /// </summary>
        /// <param name="parameterName">
        /// The parameter name.
        /// </param>
        /// <param name="operaterStr">
        /// The operater str.
        /// </param>
        /// <param name="parameterValue">
        /// The parameter value.
        /// </param>
        public ClauseCondition(string parameterName, string operaterStr, object parameterValue)
        {
            this.ParameterName = parameterName;
            this.Operator = operaterStr;
            this.ParameterValue = parameterValue;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets or sets the operator.
        /// </summary>
        public string Operator { get; set; }

        /// <summary>
        /// Gets or sets the parameter name.
        /// </summary>
        public string ParameterName { get; set; }

        /// <summary>
        /// Gets or sets the parameter value.
        /// </summary>
        public object ParameterValue { get; set; }

        #endregion Public Properties

        #region Public Methods and Operators

        /// <summary>
        /// The create new.
        /// </summary>
        /// <param name="parameterName">
        /// The parameter name.
        /// </param>
        /// <param name="operaterStr">
        /// The operater str.
        /// </param>
        /// <param name="parameterValue">
        /// The parameter value.
        /// </param>
        /// <returns>
        /// The <see cref="ClauseCondition"/>.
        /// </returns>
        public static ClauseCondition CreateNew(string parameterName, string operaterStr, object parameterValue)
        {
            return new ClauseCondition(parameterName, operaterStr, parameterValue);
        }

        #endregion Public Methods and Operators
    }
}